<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>注册成功</title>
<link rel="stylesheet" type="text/css" href="/css/nav.css">
<style type="text/css">
body{
	background: #f5f5f5;

}
.wrap{
	width: 100%;
	height: 100%;
}
.loginbg{
	background-color: #fff;
    width: 800px;
    margin: 10% auto;
    position: relative;
    min-height: 520px;
}
.logoimg{
	text-align: center;
}
.logoimg img{
	margin-top: 86px;
}
.loginbg h1{
	font-size: 18px;
	text-align: center;
	margin-top: 50px;
	color: #f33;
}
.loginbg h2{
	font-size: 16px;
	text-align: center;
	margin-top: 40px;
}
#timeout{
	margin-right: 2px;

}
.loginbg h2 a{
	font-size: 16px;
	margin-left: 2px;
}

</style>
</head>
<body>
<div class="wrap">
	<div class="loginbg">
		<div class="logoimg"><img src="/resources/images/logo.jpg" alt="logo"></div>
		<h1>注册成功!</h1>
		<h2><span id="timeout">5</span>秒后<a href="/">返回主页</a></h2>
	</div>
</div>
<script>
	window.onload = function(){
		var timeout = document.getElementById("timeout").innerHTML;
		var autoback = setInterval(t1,1000);
		function t1(){
			if (timeout>0) {
				timeout--;
				document.getElementById("timeout").innerHTML=timeout;
			}
			if(timeout==0){
				clearInterval(autoback);
				window.location.href="/";
			}
		}
	}
</script>
</body>
</html>